import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:递归求斐波那契数列的第n项
 * User: xwl
 * Date: 2023-04-03
 * Time: 14:11
 */
public class Test {
    public static void main(String[] args) {
        //1 1 2 3 5 8 13 21
        //输入
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        //调用函数
        int ret = fibonacci(n);
        //输出
        System.out.println(ret);
    }
    //递归求斐波那契数列的第n项
    public static int fibonacci(int n) {
        if(n==1 || n==2) {
            return 1;
        }else if(n > 2) {
            return fibonacci(n-1) + fibonacci(n-2);
        }else {
            System.out.println("输入错误，请重新输入:");
            return 0;
        }
    }
}